package com.csdj.essay.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.csdj.essay.entity.AttquesComment;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 评论表(问题和文章) Mapper 接口
 * </p>
 *
 * @author 刘宇
 * @since 2022-03-17
 */
public interface AttquesCommentMapper extends BaseMapper<AttquesComment> {


    /**
     * 查询问题评论条数
     * @return
     */
    @Select("SELECT COUNT(a.ques_id)\n" +
            "FROM attques_comment AS a\n" +
            "JOIN t_question AS t\n" +
            "ON t.ques_id = a.ques_id\n")
    public int comment();
}
